package com.yaoweigroup.community.ui.bm;

import java.util.ArrayList;
import java.util.List;

import com.yaoweigroup.community.R;
import com.yaoweigroup.community.adapter.TypeAdapter;
import com.yaoweigroup.community.enity.TypeIcon;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import android.widget.RelativeLayout;

public class TypeListActivity extends Activity {

	private RelativeLayout left_rl;
	private List<TypeIcon> list;
	private TypeAdapter adapter;
	private ListView listView;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_typelist);
		listView = (ListView) findViewById(R.id.listView);
		initRes();
		adapter = new TypeAdapter(this, list);
		left_rl = (RelativeLayout) findViewById(R.id.left_rl);
		left_rl.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {

				finish();
			}
		});
		listView.setAdapter(adapter);

		listView.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {

				Intent intent = new Intent(TypeListActivity.this,
						NearListActivity.class);
				startActivity(intent);
			}
		});
	}

	private void initRes() {
		list = new ArrayList<TypeIcon>();

		

	}

}
